package com.fuhao.api.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.codingapi.tx.annotation.ITxTransaction;
import com.fuhao.api.dao.OrderDao;
import com.fuhao.api.service.OrderService;
import com.fuhao.base.BaseApiService;
import com.fuhao.base.ResponseBase;

@RestController
public class OrderServiceImpl implements OrderService,ITxTransaction{

	@Autowired
	private OrderDao orderDao;
	
	@Override
	@Transactional
	public ResponseBase updateOrder(@RequestParam("isPay")Integer isPay,@RequestParam("payId") String payId, @RequestParam("orderNumber")String orderNumber) {
		Integer updateId = orderDao.updateOrder(isPay, payId, orderNumber);
		if(updateId <= 0) {
			return BaseApiService.setResultError("系统错误");
		}
		return BaseApiService.setResultSuccess();
	}

}
